<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2018/1/10
 * Time: 11:07
 * 删除链接
 */
//后台登陆控制
include_once('admin_global.php');
$db->Get_user_shell_check($uid, $shell);   //检测用户是否登录
$db->Get_user_type_check($uid, $shell);    //检测用户权限

$linkID = $_GET['linkID'];         //获取链接ID
//删除链接
$sql = "DELETE FROM links WHERE linkID=$linkID";
$query = $db->query($sql);
if ($query == true) {
    echo "<script>alert('链接删除成功！');window.location.href='listLinks.php';</script>";
} else {
    echo "<script>alert('链接删除失败！');window.location.href='listLinks.php';</script>";
}